package com.itheima.wemedia.controller;

import com.itheima.common.vo.ResultVo;
import com.itheima.wemedia.service.WmUserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @version 1.0
 * @description 说明
 * @package com.itheima.wemedia.controller
 */
@RestController
@RequestMapping("/login")
@Api(value = "loginController",tags = "自媒体端登录api")
public class LoginController {

    @Autowired
    private WmUserService wmUserService;

    /**
     * 登录校验
     * @param paramMap
     * @return
     */

    @PostMapping("/in")   //这里的/其实可以省略
    public ResultVo loginCheck(@RequestBody Map<String,String> paramMap){
        Map<String,Object> resultMap = wmUserService.loginCheck(paramMap);
        return ResultVo.ok(resultMap);
    }
}
